/**
 * 
 */
package ro.dta.idbi.ui.sql;

import java.util.EventObject;

import ro.dta.idbi.interfaces.IMemento;

/**
 * Schema undo event
 * 
 * @author Tudor Dobrila
 * 
 */
public class SchemaUndoEvent extends EventObject {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1934683688314956350L;

	/**
	 * Memento of the restored schema
	 */
	private final IMemento restoredSchema;

	/**
	 * Schema undo event class constructor
	 * 
	 * @param source
	 *            Source of the event
	 * @param restoredSchema
	 *            Memento of the restored schema
	 */
	public SchemaUndoEvent(final Object source, final IMemento restoredSchema) {
		super(source);
		this.restoredSchema = restoredSchema;
	}

	/**
	 * @return Memento of the restored schema, after the undo
	 */
	public IMemento getRestoredSchema() {
		return restoredSchema;
	}

}
